home *** CD-ROM | disk | FTP | other *** search
/ How Would You Survive? / How Would You Survive (1995)(Grolier)[Mac-PC].iso / mac / SHARED.DIR / 01950_Script_Egypt Global Buttons < prev    next >
Text File  |  1995-09-13  |  9KB  |  301 lines

  1. Global gBtn1, gBtn2, gBtn3, gBtn4, gBtn5, gBtn6, gBtn7, gBtn8, gBtn9, ¼
  2. gBtn17, gBtn18, gNewMarker, gTheHelpIsOn,gQuest
  3.  
  4. on InitBYLDemo
  5.   set gBtn4 = birth(script "aTheatreButton", 32, 140, "SE141000.AIF", "EBegin", "HandCursor")
  6. end
  7.  
  8. on EInitGlobals
  9.   set ScriptNumber = the number of cast "a3StateButton"
  10.   set gBtn1 = birth(script "aPullDown", 29, 125, 127, "SE140800.AIF", "EGlossary", "EIndex", "HandCursor")
  11.   set gBtn2 = birth(script ScriptNumber, 30, 134, "SE141700.AIF", "DoNothing", "HandCursor")
  12.   set gBtn3 = birth(script ScriptNumber, 31, 137, "SE141600.AIF", "DoNothing", "HandCursor")
  13.   set gBtn4 = birth(script ScriptNumber, 32, 140, "SE141000.AIF", "EBegin", "HandCursor")
  14.   set gBtn5 = birth(script ScriptNumber, 33, 143, "SE141100.AIF", "Table", "HandCursor")
  15.   set gBtn6 = birth(script 1983, 34, 146, 460, "EMap", "ETime", "EBasicFacts",¼
  16.                  "HowDoWeKnow", "HandCursor", "SE141200.AIF", "")
  17.   set gBtn7 = birth(script ScriptNumber, 35, 153, "SE141300.AIF", "EGame", "HandCursor")
  18.   set gBtn8 = birth(script ScriptNumber, 36, 156, "SE010251.AIF", "HelpToggle", "HandCursor")  
  19.   set gBtn9 = birth(script ScriptNumber, 37, 159, "SE141500.AIF", "Quitit", "HandCursor")
  20.   set gQuest = birth(script "aRandomQuestion", 44, 45, 148, 339, 173, 1501, 2, "",¼
  21.                    "", "", "", 1, "SE143000.AIF")
  22.   SwitchList (gQuest, 1)
  23. end
  24.  
  25. on EGlobalSetUpFromTheatre
  26.   set ScriptNumber = the number of cast "a3StateButton"
  27.   set gBtn1 = birth(script "aPullDown", 29, 125, 127, "SE140800.AIF", "EGlossary", "EIndex", "HandCursor")
  28.   set gBtn2 = birth(script ScriptNumber, 30, 134, "SE141700.AIF", "DoNothing", "HandCursor")
  29.   set gBtn3 = birth(script ScriptNumber, 31, 137, "SE141600.AIF", "DoNothing", "HandCursor")
  30.   set gBtn4 = birth(script ScriptNumber, 32, 140, "SE141000.AIF", "EBegin", "HandCursor")
  31.   set gBtn5 = birth(script ScriptNumber, 33, 143, "SE141100.AIF", "Table", "HandCursor")
  32.   set gBtn6 = birth(script 1983, 34, 146, 460, "EMap", "ETime", "EBasicFacts",¼
  33.                  "HowDoWeKnow", "HandCursor", "SE141200.AIF", "")
  34.   set gBtn7 = birth(script ScriptNumber, 35, 153, "SE141300.AIF", "EGame", "HandCursor")
  35.   set gBtn8 = birth(script ScriptNumber, 36, 156, "SE010251.AIF", "HelpToggle", "HandCursor")  
  36.   set gBtn9 = birth(script ScriptNumber, 37, 159, "SE141500.AIF", "Quitit", "HandCursor")
  37.   SwitchList (gQuest, 1)
  38. end
  39.  
  40. on EGlobalsSetUp
  41.   setNewFunctions (gBtn1, "EGlossary", "EIndex")
  42.   setNewFunction (gBtn4, "EBegin")
  43.   setNewFunction (gBtn5, "Table")
  44.   setNewFunctions (gBtn6, "EMap", "ETime", "EBasicFacts", "HowDoWeKnow")
  45.   setNewFunction (gBtn7, "EGame")
  46.   setNewFunction (gBtn8, "HelpToggle")
  47.   SwitchList (gQuest, 1)
  48. end
  49.  
  50. on EGlobalsSetUpMap
  51.   setNewFunctions (gBtn1, "EGlossary", "EIndex")
  52.   setNewFunction (gBtn4, "EBegin")
  53.   setNewFunction (gBtn5, "TableCross")
  54.   setNewFunctions (gBtn6, "ResetEMaps", "ETime", "EBasicFacts", "HowDoWeKnowCross")
  55.   setNewFunction (gBtn7, "EGame")
  56.   setNewFunction (gBtn8, "HelpToggle")
  57.   SwitchList (gQuest, 1)
  58. end
  59.  
  60. on EGlobalsSetUpGame
  61.   setNewFunctions (gBtn1, "EGlossary", "EIndex")
  62.   setNewFunction (gBtn4, "EBegin")
  63.   setNewFunction (gBtn5, "TableCross")
  64.   setNewFunctions (gBtn6, "EMap", "ETime", "EBasicFacts", "HowDoWeKnowCross")
  65.   setNewFunction (gBtn7, "DoNothing")
  66.   setNewFunction (gBtn8, "HelpToggle")
  67.   SwitchList (gQuest, 1)
  68. end
  69.  
  70.  
  71. on EGlobalsSetUpIndex
  72.   setNewFunctions (gBtn1, "EGlossary", "DoNothing")
  73.   setNewFunction (gBtn2, "EGlossary")
  74.   setNewFunction (gBtn3, "EBegin")
  75.   setNewFunction (gBtn4, "EBegin")
  76.   setNewFunction (gBtn5, "TableCross")
  77.   setNewFunctions (gBtn6, "EMap", "ETime", "EBasicFacts", "HowDoWeKnowCross")
  78.   setNewFunction (gBtn7, "EGame")
  79.   setNewFunction (gBtn8, "HelpToggle")
  80.   SwitchList (gQuest, 1)
  81. end
  82.  
  83. on EGlobalsSetUpGlossary
  84.   setNewFunctions (gBtn1, "DoNothing", "EIndex")
  85.   setNewFunction (gBtn2, "EBegin")
  86.   setNewFunction (gBtn3, "EIndex")
  87.   setNewFunction (gBtn4, "EBegin")
  88.   setNewFunction (gBtn5, "TableCross")
  89.   setNewFunctions (gBtn6, "EMap", "ETime", "EBasicFacts", "HowDoWeKnowCross")
  90.   setNewFunction (gBtn7, "EGame")
  91.   setNewFunction (gBtn8, "HelpToggle")
  92.   SwitchList (gQuest, 1)
  93. end
  94.  
  95. on EGlobalsSetUpTime
  96.   setNewFunctions (gBtn1, "EGlossary", "EIndex")
  97.   setNewFunction (gBtn4, "EBegin")
  98.   setNewFunction (gBtn5, "TableCross")
  99.   setNewFunctions (gBtn6, "EMap", "DoNothing", "EBasicFacts", "HowDoWeKnowCross")
  100.   setNewFunction (gBtn7, "EGame")
  101.   setNewFunction (gBtn8, "HelpToggle")
  102.   SwitchList (gQuest, 1)
  103. end
  104.  
  105. on EGlobalsSetUpBF
  106.   setNewFunctions (gBtn1, "EGlossary", "EIndex")
  107.   setNewFunction (gBtn4, "EBegin")
  108.   setNewFunction (gBtn5, "TableCross")
  109.   setNewFunctions (gBtn6, "EMap", "ETime", "DoNothing", "HowDoWeKnowCross")
  110.   setNewFunction (gBtn7, "EGame")
  111.   setNewFunction (gBtn8, "HelpToggle")
  112.   SwitchList (gQuest, 1)
  113. end
  114.  
  115. on EGlobalsSetUpPan
  116.   setNewFunctions (gBtn1, "EGlossary", "EIndex")
  117.   setNewFunction (gBtn4, "DoNothing")
  118.   setNewFunction (gBtn5, "TableCross")
  119.   setNewFunctions (gBtn6, "EMap", "ETime", "EBasicFacts", "HowDoWeKnowCross")
  120.   setNewFunction (gBtn7, "EGame")
  121.   setNewFunction (gBtn8, "HelpToggle")
  122.   SwitchList (gQuest, 1)
  123. end
  124.  
  125. on EGlobalRollover
  126.   RolloverJob(gQuest)
  127.   if (the MouseV < 250) then
  128.     if hilightPullDown (gBtn1) then 
  129.       return true
  130.     else
  131.       if ObjectP(gBtn17) then
  132.         if hilight (gBtn17) then 
  133.           return true
  134.         else
  135.           if ObjectP(gBtn18) then
  136.             if hilight (gBtn18) then 
  137.               return true
  138.             end if
  139.           end if
  140.         end if
  141.       end if
  142.     end if
  143.   else
  144.     if rollover(38) then
  145.       if gTheHelpIsOn = 1 then
  146.         puppetsound "SE142100.AIF"
  147.         updatestage
  148.         repeat while rollover(38)
  149.           nothing
  150.         end repeat
  151.       end if
  152.     else
  153.       if hilight (gBtn2) then 
  154.         return true
  155.       else
  156.         if hilight (gBtn3) then 
  157.           return true
  158.         else
  159.           if hilight (gBtn4) then 
  160.             return true
  161.           else
  162.             if hilight (gBtn5) then 
  163.               return true
  164.             else
  165.               if hilight (gBtn6) then 
  166.                 return true
  167.               else
  168.                 if hilight (gBtn7) then 
  169.                   return true
  170.                 else
  171.                   if hilight (gBtn8) then 
  172.                     return true
  173.                   else
  174.                     if hilight (gBtn9) then 
  175.                       return true
  176.                     else
  177.                       return false
  178.                     end if
  179.                   end if
  180.                 end if
  181.               end if
  182.             end if
  183.           end if
  184.         end if
  185.       end if
  186.     end if
  187.   end if
  188. end
  189.  
  190.  
  191. on CheckGlobalHilight
  192.   set count = 28
  193.   set GHilightStatus = FALSE
  194.   repeat while (GHilightStatus = FALSE and count < 37) 
  195.     set count = count + 1
  196.     if rollover(count) then 
  197.       set GHilightStatus = TRUE
  198.     else
  199.       if rollover(47) then
  200.         set GHilightStatus = true
  201.       else
  202.         if rollover(48) then    
  203.           set GHilightStatus = true
  204.         end if
  205.       end if
  206.     end if
  207.   end repeat
  208.   return GHilightStatus
  209. end
  210.  
  211.  
  212. on EGlobalRollover2
  213.   RolloverJob(gQuest)
  214.   if (the MouseV < 250) then
  215.     if hilightPullDown (gBtn1) then 
  216.       return true
  217.     else
  218.       if ObjectP(gBtn17) then
  219.         if hilight (gBtn17) then 
  220.           return true
  221.         else
  222.           if ObjectP(gBtn18) then
  223.             if hilight (gBtn18) then 
  224.               return true
  225.             end if
  226.           end if
  227.         end if
  228.       end if
  229.     end if
  230.   else
  231.     if rollover(38) then
  232.       if gTheHelpIsOn = 1 then
  233.         puppetsound "SE142100.AIF"
  234.         updatestage
  235.         repeat while rollover(38)
  236.           nothing
  237.         end repeat
  238.       end if
  239.     else
  240.       if donthilight (gBtn2) then 
  241.         return true
  242.       else
  243.         if donthilight (gBtn3) then 
  244.           return true
  245.         else
  246.           if hilight (gBtn4) then 
  247.             return true
  248.           else
  249.             if hilight (gBtn5) then 
  250.               return true
  251.             else
  252.               if hilight (gBtn6) then 
  253.                 return true
  254.               else
  255.                 if hilight (gBtn7) then 
  256.                   return true
  257.                 else
  258.                   if hilight (gBtn8) then 
  259.                     return true
  260.                   else
  261.                     if hilight (gBtn9) then 
  262.                       return true
  263.                     else
  264.                       return false
  265.                     end if
  266.                   end if
  267.                 end if
  268.               end if
  269.             end if
  270.           end if
  271.         end if
  272.       end if
  273.     end if
  274.   end if
  275. end
  276.  
  277. on DemoRolloverBYL
  278.   hilight(gBtn4)
  279. end
  280.  
  281. on KillBYLButton
  282.   hidecontrol(gBtn4)
  283.   set gBtn4 = 0
  284. end
  285.  
  286.  
  287.  
  288. on InitSoundsE
  289.   setnewsound (gBtn1, "SE140800.AIF")
  290.   setnewsound (gBtn2, "SE141700.AIF")
  291.   setnewsound (gBtn3, "SE141600.AIF")
  292.   setnewsound (gBtn4, "SE141000.AIF")
  293.   setnewsound (gBtn5, "SE141100.AIF")
  294.   setnewsound (gBtn6, "SE141200.AIF")
  295.   setnewsound (gBtn7, "SE141300.AIF")
  296.   setnewsound (gBtn8, "SE010251.AIF")
  297.   setnewsound (gBtn9, "SE141500.AIF")
  298.   setnewsound (gQuest, "SE143000.AIF")
  299. end
  300.  
  301.